package com.huawei.appgallery.agreementimpl.ui;

import android.app.Activity;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.huawei.appgallery.agreement.api.ui.IUpgradeActivityProtocol;
import com.huawei.hmf.annotation.ActivityDefine;
import o.axa.c;
import o.axe;
import o.axi;
import o.axz;
import o.ayb.e;
import o.ayc;
import o.ayl;
import o.ays;
import o.ayw;
import o.cgv;

@ActivityDefine(alias = "AgreementUpgradeActivity", protocol = IUpgradeActivityProtocol.class)
public class ShowUpgradeActivity extends AbsBaseProtocolActivity {
    protected String ˊ() {
        return "ShowUpgradeActivity";
    }

    protected e ˎ() {
        return e.UPGRADE;
    }

    public void onCreate(@Nullable Bundle bundle) {
        axi.ˋ(0);
        ayw.ˋ((Activity) this, "LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES");
        super.onCreate(bundle);
        ayl.ˋ(this);
        this.ˎ = ays.ˊ();
        IUpgradeActivityProtocol iUpgradeActivityProtocol = (IUpgradeActivityProtocol) this.ॱ.ॱ();
        if (iUpgradeActivityProtocol != null) {
            this.ˏ = iUpgradeActivityProtocol.getServiceType();
            this.ˋ = iUpgradeActivityProtocol.getViewType();
            this.ᐝ = iUpgradeActivityProtocol.getDialogId();
        }
        this.ˊ = true;
        cgv.ˋ(this, c.ˎ, c.ˏ);
        if (ays.ˎ() || axe.ˏ(this.ˎ)) {
            this.ʽ = new axz(this, this.ˎ);
        } else {
            this.ʽ = new ayc(this, iUpgradeActivityProtocol, this.ˎ);
            if (this.ˋ != 1) {
                getWindow().getDecorView().setBackgroundColor(getResources().getColor(c.ˏ));
            }
        }
        this.ʽ.ˎ(this);
    }
}
